package com.qf.data.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.qf.data.base.entity.BaseEntity;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * (RedEnvelopes)表实体类
 *
 * @author makejava
 * @since 2022-07-20 10:21:24
 */
@Data
@ToString(callSuper = true)
@Accessors(chain = true)
public class RedEnvelopes extends BaseEntity implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    private Long id;
    //用户id - 谁发的红包
    private Long uid;
    //红包类型 0 - 固定 1 - 随机
    private Integer type;
    //红包积分值
    private Integer score;
    //红包数量 - 多少人可以抢
    private Integer count;
    //红包描述
    private String info;
    //红包过期时间
    private Date timeout;

    //剩余的积分
    @TableField(exist = false)
    private Integer hasScore;
    //剩余的份数
    @TableField(exist = false)
    private Integer hasCount;
}


